﻿using Prism.Services.Dialogs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WPF.Core;

namespace WPF.Zero.ViewModels
{
    public class MsgViewModel : HostDialogViewModel
    {
		private string title;

		public string Title
		{
			get { return title; }
			set { title = value; }
		}

		private string message;

		public string Message
		{
			get { return message; }
			set { message = value; }
		}

        public override void OnDialogOpened(IDialogParameters parameters)
        {
			if(parameters.ContainsKey("Title"))
					Title = parameters.GetValue<string>("Title");

			if(parameters.ContainsKey("Message"))
				Message = parameters.GetValue<string>("Message");

            base.OnDialogOpened(parameters);
        }
    }
}
